<?php
/**
 * Database connection is created based in the parameters defined in the configuration file
 */
$di -> set('db', function() {
  return new \Phalcon\Db\Adapter\Pdo\Mysql([
    'host' => '127.0.0.1',
    'username' => 'root',
    'password' => 'root',
    'dbname' => '2017121501xfh',
    'options' => [
      \PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES "UTF8"'
    ]
  ]);
});